package com.eapi.project.utils.alioss;

import java.net.MalformedURLException;
import java.net.URL;
import java.nio.file.Path;
import java.nio.file.Paths;

public class FileNameFromUrl {
    public static String getFileNameFromUrl(String url) throws MalformedURLException {
        URL tempUrl = new URL(url);
        Path path = Paths.get(tempUrl.getPath());
        String fileName = path.getFileName().toString();
        return fileName;
    }

}
